tinymce.PluginManager.add("upload_image",function(n){function o(){for(var o=$(n.getContent({format:"raw"})),a=o.find("h1,h2,h3,h4,h5,h6").toArray(),e="<ul>",i=0;i<a.length;++i){var c=$(a[i]).text(),l=a[i].tagName.toLowerCase();e+='<li class="nav-'+l+'"><a class="scrollTo-a" onclick="scrollTo(\''+l+"', '"+c+"')\">"+c+"</a></li>"}e+="</ul>",$("#leanoteNav").html(e),t()}function t(){return}n.on("init",function(){window.setTimeout(function(){o(),n.on("setcontent beforeadd undo paste",o),n.on("keyup",function(){}),n.on("keydown",function(){o()}),n.on("click",function(){$("body").trigger("click")})},0)})});